package com.example.demo.common;
import java.io.Serializable;
/**
 * 封装了业务类
 */
public class ResultModel implements Serializable{
    private int code;
    private String date=DateUtil.getCurrentDateStr("yyyy-MM-dd HH:mm:ss");;
    private Object data ;

    public ResultModel() {

    }
    public ResultModel(int code) {
        this.code=code;
    }
    public ResultModel(Object data) {
        this.data = data;
    }
    public ResultModel( int code, Object data) {
        this.code = code;
        this.data = data;
    }
    public ResultModel( String date, Object data) {
        this.date = date;
        this.data = data;
    }
    public ResultModel(int errorCode, String date, Object data) {
        this.code = errorCode;
        this.date = date;
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getDate() { return date;}

    public void seDate(String date) {
        this.date = date;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
